package com.panopset.gui.container;

import javax.swing.JTextArea;
import static com.panopset.gui.LookAndFeel.*;


/**
 * JTextArea persistent container.
 *
 * @author Karl Dinwiddie
 *
 */
public class PanTextArea extends PanField<JTextArea> {

    public PanTextArea(String prompt, String toolTipText, String defaultValue) {
        super(prompt, toolTipText, defaultValue);
    }

    @Override
    protected JTextArea createComponent() {
        JTextArea rtn = new JTextArea();
        rtn.setFont(TEXT_AREA_FONT);
        return rtn;
    }

    @Override
    public String getComponentValue() {
        return getInnerComponent().getText();
    }

    @Override
    public void setComponentValue(String value) {
        getInnerComponent().setText(value);
    }

}
